package com.base.logistics.jdl.bean.print;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * <pre>
 * 获取打印数据参数对象
 * </pre>
 * @since 2021-02-22
 */
public class PullDataReqDTO  implements Serializable {

    /**
     * pin授权码/商家授权pin
     * <pre>
     * 是否必填：否
     * </pre>
     */
    private String pin;

    /**
     * 参数,key有文档规范。电子面单商家编码:ewCustomerCode(String)（青龙业主号），商城商家编码:eCustomerCode(String)
     * <pre>
     * 是否必填：是
     * </pre>
     */
    private Map<String, String> parameters;


    /**
     * 物流公司编码。京东快递：JD
     * <pre>
     * 是否必填：是
     * </pre>
     */
    private String cpCode;

    /**
     * 每次请求唯一，本次获取打印数据请求ID，长度不超过20位
     * <pre>
     * 是否必填：是
     * </pre>
     */
    private String objectId;

    /**
     * 运单信息列表 最多支持10条
     * <pre>
     * 是否必填：是
     * </pre>
     */
    private List<WayBillInfo> wayBillInfos;

    public PullDataReqDTO() {
    }

    public String getPin() {
        return this.pin;
    }

    public Map<String, String> getParameters() {
        return this.parameters;
    }

    public String getCpCode() {
        return this.cpCode;
    }

    public String getObjectId() {
        return this.objectId;
    }

    public List<WayBillInfo> getWayBillInfos() {
        return this.wayBillInfos;
    }

    public void setPin(String pin) {
        this.pin = pin;
    }

    public void setParameters(Map<String, String> parameters) {
        this.parameters = parameters;
    }

    public void setCpCode(String cpCode) {
        this.cpCode = cpCode;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    public void setWayBillInfos(List<WayBillInfo> wayBillInfos) {
        this.wayBillInfos = wayBillInfos;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof PullDataReqDTO)) return false;
        final PullDataReqDTO other = (PullDataReqDTO) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$pin = this.getPin();
        final Object other$pin = other.getPin();
        if (this$pin == null ? other$pin != null : !this$pin.equals(other$pin)) return false;
        final Object this$parameters = this.getParameters();
        final Object other$parameters = other.getParameters();
        if (this$parameters == null ? other$parameters != null : !this$parameters.equals(other$parameters))
            return false;
        final Object this$cpCode = this.getCpCode();
        final Object other$cpCode = other.getCpCode();
        if (this$cpCode == null ? other$cpCode != null : !this$cpCode.equals(other$cpCode)) return false;
        final Object this$objectId = this.getObjectId();
        final Object other$objectId = other.getObjectId();
        if (this$objectId == null ? other$objectId != null : !this$objectId.equals(other$objectId)) return false;
        final Object this$wayBillInfos = this.getWayBillInfos();
        final Object other$wayBillInfos = other.getWayBillInfos();
        if (this$wayBillInfos == null ? other$wayBillInfos != null : !this$wayBillInfos.equals(other$wayBillInfos))
            return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof PullDataReqDTO;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $pin = this.getPin();
        result = result * PRIME + ($pin == null ? 43 : $pin.hashCode());
        final Object $parameters = this.getParameters();
        result = result * PRIME + ($parameters == null ? 43 : $parameters.hashCode());
        final Object $cpCode = this.getCpCode();
        result = result * PRIME + ($cpCode == null ? 43 : $cpCode.hashCode());
        final Object $objectId = this.getObjectId();
        result = result * PRIME + ($objectId == null ? 43 : $objectId.hashCode());
        final Object $wayBillInfos = this.getWayBillInfos();
        result = result * PRIME + ($wayBillInfos == null ? 43 : $wayBillInfos.hashCode());
        return result;
    }

    public String toString() {
        return "PullDataReqDTO(pin=" + this.getPin() + ", parameters=" + this.getParameters() + ", cpCode=" + this.getCpCode() + ", objectId=" + this.getObjectId() + ", wayBillInfos=" + this.getWayBillInfos() + ")";
    }
}
